package com.java.demo;

import com.java.demo.model.ArticleInfo;
import org.springframework.context.annotation.Bean;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
public class Articles {
    @Bean("def")
    public ArticleInfo getArticle(){
        //伪代码
        ArticleInfo articleInfo = new ArticleInfo();
        articleInfo.setId(1);
        articleInfo.setTitle("今天周几？");
        articleInfo.setContent("今天周一");
        articleInfo.setCreateTime(LocalDateTime.now());
        return articleInfo;
    }

}
